package com.ruoyi.biz.enums;

import lombok.Getter;

/**
 * @author tianl
 * @date 2025/1/3
 * @description:
 */
@Getter
public enum ProjectStatusEnum {
    SAVE("待递交",0),
    DOING("进行中",1),
    OVERDUE("逾期",2),
    JUDICIAL("转司法",3),
    INVOICE("待开票",4),
    RECEIPT("待收款",5),
    DG("底稿已归档",98),
    CANCEL("已终止",99),
    DONE("已完成",100),
    ;
    private String name;
    private Integer code;

    ProjectStatusEnum(String name, Integer code) {
        this.name = name;
        this.code = code;
    }

    public static String getNameByCode(Integer code) {
        for (ProjectStatusEnum item : values()) {
            if (item.getCode().equals(code)) {
                return item.name;
            }
        }
        return "";
    }
}
